<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .mask {
            /*width: 100vw;*/
            /*height: 100vh;*/
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            background: rgba(0,0,0,0.5);
        }
        .mask>.modal {
            width: 600px;
            height: 400px;
            background: #fff;

            position: absolute;
            left: 50%;
            top:50%;
            transform: translate(-50%,-50%);

            border-radius: 10px;
            box-shadow: 1px 1px 5px #333;

        }
    </style>
</head>
<body>
    <div class="mask">
        <div class="modal"></div>
    </div>
</body>
</html>